package swa2.icecream.command;

import swa2.icecream.factory.AbstractIceCreamFactory;

public class ChocolateOffCommand implements Command
{
	private AbstractIceCreamFactory factory;
	
	public ChocolateOffCommand(AbstractIceCreamFactory factory) {
		super();
		this.factory = factory;
	}
	
	@Override
	public void execute() {
		factory.addChocolate(-1);
	}

	@Override
	public void undo() {
		factory.addChocolate(+1);
	}

}
